package cn.jinjimi.app.main.activity;

import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.view.View;

import cn.jinjimi.app.R;
import cn.jinjimi.app.main.extend.BaseActivity;
import cn.jinjimi.app.main.fragment.CardContainerFragment;

/**
 * Created by lforxeverc on 2016/10/18.
 */

public class AllCardListActivity extends BaseActivity implements View.OnClickListener {
    @Override
    protected void beforeInitView() {
        setContentView(R.layout.activity_card_list);
    }

    @Override
    protected void initial() {
        findViewById(R.id.btn_left).setOnClickListener(this);
        showAllCardFragment();
    }

    private void showAllCardFragment() {
        FragmentManager fm = getSupportFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        ft.replace(R.id.fl_container, new CardContainerFragment());
        ft.commit();
    }

    @Override
    public void onClick(View v) {
        if (v.getId() == R.id.btn_left) {
            finish();
        }
    }

}
